#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
	int money = 0;
	scanf("%d", &money);
	int hele = money;
	int kongping = money;
	while (kongping > 1)
	{
		hele= hele + kongping / 2;
		kongping = kongping / 2 + kongping % 2;
	}
	printf("%d\n",hele);
	return 0;
}